/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package isd.inventario.modelo;

import java.io.Serializable;

/**
 *
 * @author Claudio
 */
//@Embeddable
public class ST_ItemComposicionFormulaPK implements Serializable {
    
    private String tippro;
    private String artcod;
    private String formul;    
    private int nroitm;

    public ST_ItemComposicionFormulaPK() {
    }

    public ST_ItemComposicionFormulaPK(String sttfoiTippro, String sttfoiArtcod, String sttfoiFormul, int sttfoiNroitm) {
        this.tippro = sttfoiTippro;
        this.artcod = sttfoiArtcod;
        this.formul = sttfoiFormul;
        this.nroitm = sttfoiNroitm;
    }

    public String getArtcod() {
        return artcod;
    }

    public void setArtcod(String artcod) {
        this.artcod = artcod;
    }

    public String getFormul() {
        return formul;
    }

    public void setFormul(String formul) {
        this.formul = formul;
    }

    public int getNroitm() {
        return nroitm;
    }

    public void setNroitm(int nroitm) {
        this.nroitm = nroitm;
    }

    public String getTippro() {
        return tippro;
    }

    public void setTippro(String tippro) {
        this.tippro = tippro;
    }


    @Override
    public int hashCode() {
        int hash = 0;
        hash += (tippro != null ? tippro.hashCode() : 0);
        hash += (artcod != null ? artcod.hashCode() : 0);
        hash += (formul != null ? formul.hashCode() : 0);
        hash += (int) nroitm;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ST_ItemComposicionFormulaPK)) {
            return false;
        }
        ST_ItemComposicionFormulaPK other = (ST_ItemComposicionFormulaPK) object;
        if ((this.tippro == null && other.tippro != null) || (this.tippro != null && !this.tippro.equals(other.tippro))) {
            return false;
        }
        if ((this.artcod == null && other.artcod != null) || (this.artcod != null && !this.artcod.equals(other.artcod))) {
            return false;
        }
        if ((this.formul == null && other.formul != null) || (this.formul != null && !this.formul.equals(other.formul))) {
            return false;
        }
        if (this.nroitm != other.nroitm) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "isd.inventario.modelo.ST_ItemComposicionFormulaPK[sttfoiTippro=" + artcod + ", sttfoiArtcod=" + artcod + ", sttfoiFormul=" + formul + ", sttfoiNroitm=" + nroitm + "]";
    }

}
